/* $RCSFile: ADNDynOrganizationstatistic.cs $
 * Apache license v2 2011 by Christian Surieux
 * $Source: ?/CRMWrapper3/DynEntities/ADNDynOrganizationstatistic.cs $
 * $log$
 * Revision 6 2010/08/06 19:56:33  christian.surieux
 *   Added Log to All cs files
 */

/* Copyrights Christian Surieux 2010 */
/* Class ADNDynOrganizationstatistic */
/* Date 2010-01-06 16:10:11Z */

using System;
using System.Diagnostics;
using System.Collections;
using System.ComponentModel;
using System.Collections.Generic;
using System.Text;
using CrmSdk;

namespace AddonNice.CRMWrapper
{
    public class ADNDynOrganizationstatistic : DynEntity
    {
        protected class Ftor: DFactor
        {
            public Ftor() : base(CrmStr.organizationstatistic)
            {}

            public override Type DynType
            { get { return typeof(ADNDynOrganizationstatistic); } }

            public override string DynTypename
            {   get{ return CrmStr.organizationstatistic;}}

            public override DynEntity Build()
            {   return new ADNDynOrganizationstatistic();}

            public override DynEntity Build(CRMWrapperBase w, InternalDynamicEntity dEntity, PropertyDescriptorCollection wproperties)
            {   return new ADNDynOrganizationstatistic(w, dEntity, wproperties, null);}

            public override DynEntity Build(CRMWrapperBase w, string PrimaryFieldValue)
            {   return new ADNDynOrganizationstatistic(w,PrimaryFieldValue);}

            public override DynEntity Build(CRMWrapperBase w,Guid PrimaryKeyValue)
            {   return new ADNDynOrganizationstatistic(w,PrimaryKeyValue);}
        }

        static ADNDynOrganizationstatistic(){new Ftor();} 
        
        public override bool HasOwnerProperty
        {
            get { return false; }
        }
        
        public override bool HasPrimaryField
        {
            get
            { return false; }
        }

        public ADNDynOrganizationstatistic() : base() { }
        
        public ADNDynOrganizationstatistic(CRMWrapperBase w,string PrimaryFieldValue)
            : base(w,CrmStr.organizationstatistic)
        { }
        
        public ADNDynOrganizationstatistic(CRMWrapperBase w,Guid CrmId) : base(w,CrmStr.organizationstatistic,CrmId) { }
        
        public ADNDynOrganizationstatistic(CRMWrapperBase w,InternalDynamicEntity e) : base(w,CrmStr.organizationstatistic,e,null,null) { }
        
        public ADNDynOrganizationstatistic(CRMWrapperBase w,InternalDynamicEntity e,PropertyDescriptorCollection prop,InternalColumnSet s) : base(w,CrmStr.organizationstatistic,e,prop,s) { }
        
        public ADNDynOrganizationstatistic(ResetWrapperHandler fn,string PrimaryFieldValue)
            : base(fn,CrmStr.organizationstatistic)
        { }
        
        public ADNDynOrganizationstatistic(ResetWrapperHandler fn,Guid CrmId) : base(fn,CrmStr.organizationstatistic,CrmId) { }
        
        public ADNDynOrganizationstatistic(ResetWrapperHandler fn,InternalDynamicEntity e) : base(fn,CrmStr.organizationstatistic,e,null,null) { }
        
        public ADNDynOrganizationstatistic(ResetWrapperHandler fn,InternalDynamicEntity e,PropertyDescriptorCollection prop,InternalColumnSet s) : base(fn,CrmStr.organizationstatistic,e,prop,s) { }

        /* Properties */

        [CrmDynAttribute(CrmStr.organizationstatistic)]
        public Guid organizationstatisticid
        {
            get
            { return KeyPropertyValue(CrmStr.organizationstatisticid); }
            set
            { AddKeyProperty(CrmStr.organizationstatisticid,value); }
        }

        protected override void SetCrmIdProperty(Guid crmId)
        {
            if ( !dicProperty.ContainsKey(CrmStr.organizationstatisticid) || KeyPropertyValue(CrmStr.organizationstatisticid) != crmId )
                organizationstatisticid = crmId;
        }
        public override Guid PrimaryKeyGuidValue
        {
            get
            { return organizationstatisticid; }
            set { organizationstatisticid = value; }
        }
        [CrmDynAttribute(CrmStr.organizationstatistic)]
        public int hour
        {
            get
            { return NumberPropertyValue(CrmStr.hour); }
            set
            { AddNumberProperty(CrmStr.hour,value); }
        }

        [CrmDynAttribute(CrmStr.organizationstatistic)]
        public string servername
        {
            get
            { return StringPropertyValue(CrmStr.servername); }
            set
            { AddStringProperty(CrmStr.servername,value); }
        }

        [CrmDynAttribute(CrmStr.organizationstatistic)]
        public int statistictype
        {
            get
            { return NumberPropertyValue(CrmStr.statistictype); }
            set
            { AddNumberProperty(CrmStr.statistictype,value); }
        }

        [CrmDynAttribute(CrmStr.organizationstatistic)]
        public int statisticvalue
        {
            get
            { return NumberPropertyValue(CrmStr.statisticvalue); }
            set
            { AddNumberProperty(CrmStr.statisticvalue,value); }
        }
    }
}